package org.example.petitionplatformsystem.dao;

import org.example.petitionplatformsystem.dao.model.Institution;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface InstitutionRepository extends JpaRepository <Institution,Long>{
    @Query("SELECT d FROM Institution d WHERE d.institutionId = :institutionId")
    Optional<Institution> findById(@Param("institutionId") Long institutionId);
}
